$f(x) = \begin{cases} 6x & \text{for} ~~~~x\gt{0} \\ 3x^2-2x& \text{for} ~~~~ x \leq0\end{cases}$ Evaluate the definite integral. $\int^2_{-2}f(x)\,dx = $ Choose 1 answer: Choose 1 answer: (Choice A) A $8$ (Choice B) B $16$ (Choice C) C $24$ (Choice D) D $32$
Answer: Splitting up the definite integral Since we're working with a piecewise function, we need to split the definite integral up into two pieces: $\phantom{=} \int^2_{-2}f(x)\,dx$ $= \int^2_{0}f(x)\,dx + \int^{0}_{-2}f(x)\,dx~~~~~~$ [Why did we split at 0?] $= \int^2_{0}6x\,dx + \int^{0}_{-2}(3x^2-2x)\,dx ~~~~~~$ Evaluating each piece Next, let's evaluate each of these definite integrals one at a time. The first definite integral: $\begin{aligned} \int^2_{0}6x\,dx &=3x^2\Bigg|^2_{{0}} \\\\ &= \left[3 \cdot( 2)^2 \right] - \left[3 \cdot({0})^2\right] \\\\ &= \left[12\right] -\left[0 \right] \\\\ &= {12}\end{aligned}$ The second definite integral: $\begin{aligned} \int^0_{-2}(3x^2-2x)\,dx &=(x^3-x^2)\Bigg|^0_{{-2}} \\\\ &= \left[ ( 0)^3 - ( 0)^2 \right] - \left[({-2})^3-({-2})^2\right] \\\\ &= \left[0\right] -\left[-12 \right] \\\\ &= {12}\end{aligned}$ Putting the pieces together Now let's add these two pieces together to find the answer: $\phantom{=} \int^2_{0}6x\,dx + \int^{0}_{-2}(3x^2-2x)\,dx$ $ = {12} + {12}$ $ = 24$ The answer $\int^2_{-2}f(x)\,dx = 24$